package com.xydtech.ecard.custgroup.service.impl;

import com.xydtech.common.core.text.Convert;
import com.xydtech.ecard.custgroup.domain.EcardCustomerOrganizeVisit;
import com.xydtech.ecard.custgroup.mapper.EcardCustomerOrganizeVisitMapper;
import com.xydtech.ecard.custgroup.service.IEcardCustomerOrganizeVisitService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 电子名片社团组织拜访记录Service业务层处理
 *
 * @author yuzhiguo
 * @date 2024-12-03 下午1:07
 */
@Service
public class EcardCustomerOrganizeVisitServiceImpl implements IEcardCustomerOrganizeVisitService
{
    @Autowired
    private EcardCustomerOrganizeVisitMapper ecardCustomerOrganizeVisitMapper;

    /**
     * 查询电子名片社团组织拜访记录
     *
     * @param id 电子名片社团组织拜访记录主键
     * @return 电子名片社团组织拜访记录
     */
    @Override
    public EcardCustomerOrganizeVisit selectEcardCustomerOrganizeVisitById(Long id)
    {
        return ecardCustomerOrganizeVisitMapper.selectEcardCustomerOrganizeVisitById(id);
    }

    /**
     * 查询电子名片社团组织拜访记录列表
     *
     * @param ecardCustomerOrganizeVisit 电子名片社团组织拜访记录
     * @return 电子名片社团组织拜访记录
     */
    @Override
    public List<EcardCustomerOrganizeVisit> selectEcardCustomerOrganizeVisitList(EcardCustomerOrganizeVisit ecardCustomerOrganizeVisit)
    {
        return ecardCustomerOrganizeVisitMapper.selectEcardCustomerOrganizeVisitList(ecardCustomerOrganizeVisit);
    }

    /**
     * 新增电子名片社团组织拜访记录
     *
     * @param ecardCustomerOrganizeVisit 电子名片社团组织拜访记录
     * @return 结果
     */
    @Override
    public int insertEcardCustomerOrganizeVisit(EcardCustomerOrganizeVisit ecardCustomerOrganizeVisit)
    {
        return ecardCustomerOrganizeVisitMapper.insertEcardCustomerOrganizeVisit(ecardCustomerOrganizeVisit);
    }

    /**
     * 修改电子名片社团组织拜访记录
     *
     * @param ecardCustomerOrganizeVisit 电子名片社团组织拜访记录
     * @return 结果
     */
    @Override
    public int updateEcardCustomerOrganizeVisit(EcardCustomerOrganizeVisit ecardCustomerOrganizeVisit)
    {
        return ecardCustomerOrganizeVisitMapper.updateEcardCustomerOrganizeVisit(ecardCustomerOrganizeVisit);
    }

    /**
     * 批量删除电子名片社团组织拜访记录
     *
     * @param ids 需要删除的电子名片社团组织拜访记录主键
     * @return 结果
     */
    @Override
    public int deleteEcardCustomerOrganizeVisitByIds(String ids)
    {
        return ecardCustomerOrganizeVisitMapper.deleteEcardCustomerOrganizeVisitByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除电子名片社团组织拜访记录信息
     *
     * @param id 电子名片社团组织拜访记录主键
     * @return 结果
     */
    @Override
    public int deleteEcardCustomerOrganizeVisitById(Long id)
    {
        return ecardCustomerOrganizeVisitMapper.deleteEcardCustomerOrganizeVisitById(id);
    }
}
